# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gspell
pkgver=1.12.2
pkgrel=2
pkgdesc="Flexible API to add spell checking to a GTK+ application"
options="!check" # Test fails because of missing machine-id
url="https://wiki.gnome.org/Projects/gspell"
arch="all"
license="LGPL-2.1-or-later"
depends="iso-codes"
makedepends="
	enchant2-dev
	glib-dev
	gobject-introspection-dev
	gtk+3.0-dev
	iso-codes-dev
	vala
	"
checkdepends="xvfb-run hunspell-en ibus"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-lang"
source="https://download.gnome.org/sources/gspell/${pkgver%.*}/gspell-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	xvfb-run -a make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
c13df805f6128cfd19c41e4936fbb49516f80e09d27e79380d5638cbd1a8a3bfc6aae5ef8a4faa748495fe529bde92805bbd5530610b113c58daa36f273a5af8  gspell-1.12.2.tar.xz
"
